.TH SYM2REPL 1 "October 2010" "" "Test Dept."
.SH NAME
sym2repl \- output replacement symbol table for repointing object file references
.SH SYNOPSIS
.B sym2repl
.RI [ symbols
.IR file ]
.br
.SH DESCRIPTION
.\" Add any additional description here
Reads a symbol table as presented by
.I nm(1) -p
and outputs a new table containing pairs of a symbol name and a
replacement symbol name on each line.  All replacement symbols are
named exactly as the symbol name with the suffix "_test_dept_proxy"
which is the Test Dept. naming convention for indirection proxies for
runtime function swicthing.

The resulting table is compatible with objcopy(1).

Please refer to sym2asm(1) man page for more information on
function switching.

.SH EXAMPLES
.nf
nm -p sut.o | sym2repl >sut_replacement_symbols.txt
objcopy --redefine-syms=sut_replacement_symbols.txt sut.o sut_using_proxies.o
.fi

.SH AUTHOR
M Norrby <norrby+test-dept@lysator.liu.se>

.SH "REPORTING BUGS"
Please enter bugs as issues in <http://code.google.com/p/test-dept/issues/list>

.SH COPYRIGHT
Copyright \(co 2008--2010 Mattias Norrby
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

.SH SEE ALSO
.IR build_main_from_symbols (1),
.IR objcopy (1),
.IR sym2asm (1),
.IR test_dept (1),
.IR test-dept (3).
